package EPIRPSystem;


/**
 * Generated from IDL interface "EPIRP".
 *
 * @author JacORB IDL compiler V 2.3.0, 17-Feb-2007
 * @version generated at 2013-5-20 22:07:19
 */

public class _EPIRPStub
	extends org.omg.CORBA.portable.ObjectImpl
	implements EPIRPSystem.EPIRP
{
	private String[] ids = {"IDL:EPIRPSystem/EPIRP:1.0"};
	public String[] _ids()
	{
		return ids;
	}

	public final static java.lang.Class _opsClass = EPIRPSystem.EPIRPOperations.class;
	public ManagedGenericIRPConstDefs.Method[] get_ep_irp_operations_profile(java.lang.String irp_version) throws ManagedGenericIRPSystem.InvalidParameter,ManagedGenericIRPSystem.OperationNotSupported,EPIRPSystem.GetEPIRPOperationsProfile
	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "get_ep_irp_operations_profile", true);
				_os.write_string(irp_version);
				_is = _invoke(_os);
				ManagedGenericIRPConstDefs.Method[] _result = ManagedGenericIRPConstDefs.MethodListHelper.read(_is);
				return _result;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:ManagedGenericIRPSystem/InvalidParameter:1.0"))
				{
					throw ManagedGenericIRPSystem.InvalidParameterHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:ManagedGenericIRPSystem/OperationNotSupported:1.0"))
				{
					throw ManagedGenericIRPSystem.OperationNotSupportedHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:EPIRPSystem/GetEPIRPOperationsProfile:1.0"))
				{
					throw EPIRPSystem.GetEPIRPOperationsProfileHelper.read(_ax.getInputStream());
				}
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "get_ep_irp_operations_profile", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			EPIRPOperations _localServant = (EPIRPOperations)_so.servant;
			ManagedGenericIRPConstDefs.Method[] _result;
			try
			{
				_result = _localServant.get_ep_irp_operations_profile(irp_version);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}

		}

	}

	public EPIRPConstDefs.Result release_irp_reference(java.lang.String manager_identifier, java.lang.String irp_reference) throws EPIRPSystem.UnknownIRPReference,EPIRPSystem.ReleaseIRPReference
	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "release_irp_reference", true);
				_os.write_string(manager_identifier);
				_os.write_string(irp_reference);
				_is = _invoke(_os);
				EPIRPConstDefs.Result _result = EPIRPConstDefs.ResultHelper.read(_is);
				return _result;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:EPIRPSystem/UnknownIRPReference:1.0"))
				{
					throw EPIRPSystem.UnknownIRPReferenceHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:EPIRPSystem/ReleaseIRPReference:1.0"))
				{
					throw EPIRPSystem.ReleaseIRPReferenceHelper.read(_ax.getInputStream());
				}
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "release_irp_reference", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			EPIRPOperations _localServant = (EPIRPOperations)_so.servant;
			EPIRPConstDefs.Result _result;
			try
			{
				_result = _localServant.release_irp_reference(manager_identifier,irp_reference);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}

		}

	}

	public EPIRPConstDefs.Result get_irp_reference(java.lang.String manager_identifier, java.lang.String system_dn, java.lang.String irp_id, java.lang.String irpClassName, org.omg.CORBA.StringHolder irp_reference) throws EPIRPSystem.GetIRPReference,ManagedGenericIRPSystem.InvalidParameter
	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "get_irp_reference", true);
				_os.write_string(manager_identifier);
				_os.write_string(system_dn);
				_os.write_string(irp_id);
				_os.write_string(irpClassName);
				_is = _invoke(_os);
				EPIRPConstDefs.Result _result = EPIRPConstDefs.ResultHelper.read(_is);
				irp_reference.value = _is.read_string();
				return _result;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:EPIRPSystem/GetIRPReference:1.0"))
				{
					throw EPIRPSystem.GetIRPReferenceHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:ManagedGenericIRPSystem/InvalidParameter:1.0"))
				{
					throw ManagedGenericIRPSystem.InvalidParameterHelper.read(_ax.getInputStream());
				}
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "get_irp_reference", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			EPIRPOperations _localServant = (EPIRPOperations)_so.servant;
			EPIRPConstDefs.Result _result;
			try
			{
				_result = _localServant.get_irp_reference(manager_identifier,system_dn,irp_id,irpClassName,irp_reference);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}

		}

	}

	public java.lang.String[] get_ep_irp_versions() throws EPIRPSystem.GetEPIRPVersions
	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "get_ep_irp_versions", true);
				_is = _invoke(_os);
				java.lang.String[] _result = ManagedGenericIRPConstDefs.VersionNumberSetHelper.read(_is);
				return _result;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:EPIRPSystem/GetEPIRPVersions:1.0"))
				{
					throw EPIRPSystem.GetEPIRPVersionsHelper.read(_ax.getInputStream());
				}
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "get_ep_irp_versions", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			EPIRPOperations _localServant = (EPIRPOperations)_so.servant;
			java.lang.String[] _result;
			try
			{
				_result = _localServant.get_ep_irp_versions();
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}

		}

	}

	public EPIRPConstDefs.Result get_irp_outline(java.lang.String irp_version, EPIRPConstDefs.SupportedIRPListHolder supported_irp_list) throws EPIRPSystem.InvalidIRPVersion,EPIRPSystem.GetIRPOutline
	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "get_irp_outline", true);
				_os.write_string(irp_version);
				_is = _invoke(_os);
				EPIRPConstDefs.Result _result = EPIRPConstDefs.ResultHelper.read(_is);
				supported_irp_list.value = EPIRPConstDefs.SupportedIRPListHelper.read(_is);
				return _result;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:EPIRPSystem/InvalidIRPVersion:1.0"))
				{
					throw EPIRPSystem.InvalidIRPVersionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:EPIRPSystem/GetIRPOutline:1.0"))
				{
					throw EPIRPSystem.GetIRPOutlineHelper.read(_ax.getInputStream());
				}
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "get_irp_outline", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			EPIRPOperations _localServant = (EPIRPOperations)_so.servant;
			EPIRPConstDefs.Result _result;
			try
			{
				_result = _localServant.get_irp_outline(irp_version,supported_irp_list);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}

		}

	}

	public ManagedGenericIRPConstDefs.Method[] get_ep_irp_notification_profile(java.lang.String irp_version) throws ManagedGenericIRPSystem.InvalidParameter,ManagedGenericIRPSystem.OperationNotSupported,EPIRPSystem.GetEPIRPNotificationProfile
	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "get_ep_irp_notification_profile", true);
				_os.write_string(irp_version);
				_is = _invoke(_os);
				ManagedGenericIRPConstDefs.Method[] _result = ManagedGenericIRPConstDefs.MethodListHelper.read(_is);
				return _result;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:ManagedGenericIRPSystem/InvalidParameter:1.0"))
				{
					throw ManagedGenericIRPSystem.InvalidParameterHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:ManagedGenericIRPSystem/OperationNotSupported:1.0"))
				{
					throw ManagedGenericIRPSystem.OperationNotSupportedHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:EPIRPSystem/GetEPIRPNotificationProfile:1.0"))
				{
					throw EPIRPSystem.GetEPIRPNotificationProfileHelper.read(_ax.getInputStream());
				}
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "get_ep_irp_notification_profile", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			EPIRPOperations _localServant = (EPIRPOperations)_so.servant;
			ManagedGenericIRPConstDefs.Method[] _result;
			try
			{
				_result = _localServant.get_ep_irp_notification_profile(irp_version);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}

		}

	}

}
